package top.lingchen.blogapi.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import top.lingchen.blogapi.service.LoginService;
import top.lingchen.blogapi.vo.Result;
import top.lingchen.blogapi.vo.params.LoginParam;

/**
 * @Author 凌宸
 * @create 2021-12-16 下午 5:02
 * @Description
 * @Version 1.0
 */
@RestController
@RequestMapping("/login")
public class LoginController {

    @Autowired
    private LoginService loginService;

    @PostMapping
    public Result login(@RequestBody LoginParam loginParam){
        // 登录 验证用户 访问用户表
        return loginService.login(loginParam);
    }

}
